package com.taxigang.client.uibinder;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.taxigang.client.micro.TaxiGangCreator;
import com.taxigang.client.ui.map.MapView.PanelType;

public class CongratulationsJoin extends TaxiGangPanel  {

	private static CongratulationsJoinUiBinder uiBinder = GWT
			.create(CongratulationsJoinUiBinder.class);

	interface CongratulationsJoinUiBinder extends
			UiBinder<Widget, CongratulationsJoin> {
	}
	
	@UiField Button closeButton;
	@UiField Label sorryText;
	@UiField
	Label headerLabel;

	public CongratulationsJoin() {
		initWidget(uiBinder.createAndBindUi(this));
		sorryText.setText(TaxiGangCreator.taxiGangConstants.congratulationsJoin());
		closeButton.setText(TaxiGangCreator.taxiGangConstants.cont());
		headerLabel.setText(TaxiGangCreator.taxiGangConstants.congratulations());

		closeButton.addClickHandler(new ClickHandler() {
			
			@Override
			public void onClick(ClickEvent event) {
				taxiGangRoute.show(PanelType.MYTAXIGANGS);
			}
		});

	}

}
